package com.chaodev.base.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.sql.Time;
import java.time.LocalDateTime;

@Data
public class TrainingPageDto implements Serializable {
    private Integer page;
    private Integer rows;
    @ApiModelProperty(value = "培训课程编码")
    private String trainingCode;

    @ApiModelProperty(value = "培训课程名称")
    private String name;

    @ApiModelProperty(value = "培训课程主题ID")
    private Integer trainingItemId;

    @ApiModelProperty(value = "培训课程主题名称")
    private Integer trainingItemName;

    @ApiModelProperty(value = "参与人数")
    private Integer number;

    @ApiModelProperty(value = "报名时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registrationTime;

    @ApiModelProperty(value = "截止时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "培训课程状态")
    private Integer status; //0-未开始, 1-已开始, 2-已结束

    @ApiModelProperty(value = "预计学习时长")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "HH:mm:ss")
    private Time learningDuration;

    @ApiModelProperty(value = "培训分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "培训分类名称")
    private Integer categoryName;

    /**
     * 区分哪一端来调用接口
     * 1-管理端，2-用户端
     */
    private Integer dataType;

}
